<?php
declare (strict_types = 1);

namespace app\wap\middleware;

use Closure;
use think\Request;

class Checkinput
{
    /**
     * 处理请求
     *
     * @param Request $request
     * @param Closure       $next
     * @return Response
     */
    public function handle($request, Closure $next)
    {
        // 添加前置中间件执行代码
        echo '我是wap控制器中间件, 我正在运行';
        echo '<br/>';

        $request -> username ='我是,控制器中间件.';

        $response =  $next($request);


        // 添加后置中间件执行代码

        return $response;
    }
}
